

module Cms
    
    class ContextMenu::Stone < Widget

      def initialize color, caption
        super()
        @color = color
        self.innerHTML = caption
        self.style = "background-color:#{@color};"
      end

      def render

        context.page.head.e :script, "jQuery(function($) { $('##{id}').mouseup(function(ev) {
            console.log('down: #{@color}');
          })  
        })
        "
        super()
      end
    end
    
end    